Skip to main content

Vendor-Specific Purchase Order Excel Attachment


Scenario

A company sends purchase orders to vendors by email from Business Central. One vendor requires the purchase order to also be provided as an Excel file in a specific layout — for example, a format that matches their procurement portal import template. Other vendors do not need this extra attachment.

Rather than manually exporting and attaching the Excel file each time, the company uses Elevate Attachments to automatically include a report layout attachment whenever a purchase order is emailed to that vendor. The Excel report is rendered from a custom report layout at send time, so it always contains the current order data.

This use case demonstrates the Report Attachments feature — attaching additional report layouts (Excel, Word, or PDF) alongside the standard document.

Step 1: Create the Excel Report Layout

Before configuring Elevate Attachments, ensure you have a custom Excel report layout for the purchase order report that matches the vendor's required format.

  1. Use Tell Me (Alt+Q) and search for Custom Report Layouts (or Report Layout Selection).
  2. Create a new Excel layout for the Purchase Order report (the same Report ID used in your Report Selection - Purchase for the P.Order usage).
  3. Design the layout to match the vendor's required format — column order, headers, and structure.

Note: The Report ID of the layout must match the Report ID on the report selection line. If your standard purchase order uses Report 1322, the Excel layout must also be for Report 1322.

Step 2: Create an Attachment Group

  1. Search for Attachment Groups and open the list.

  2. Click + New to create a new group:

    FieldValue
    CodePO-EXCEL
    NamePurchase Order — Vendor Excel Format
  3. Open the group via the Group Attachments action.

Step 3: Add the Report Layout to the Group

  1. In the Reports section of the Group Attachments page, click Add from Report Layout List.
  2. From the lookup, select the custom Excel layout you created in Step 1.
  3. The report's Report ID, Name, Runtime Package ID, and Layout Format are populated automatically.

The Reports section should now show:

Report IDNameLayout Format
1322Purchase OrderExcel

When the purchase order is emailed, Business Central renders this report layout using the order's data and attaches the resulting .xlsx file alongside the standard purchase order document.

Since this Excel attachment is specific to one vendor, configure it at the vendor level rather than globally.

  1. Open the Vendor Card for the vendor that requires the Excel format.
  2. Navigate to Related > Document Layouts.
  3. On the P.Order (Purchase Order) usage line, set the Attachment Group Code to PO-EXCEL.

Only this vendor's purchase orders will include the Excel attachment. All other vendors continue to receive the standard purchase order document without any additional attachments.

Tip: If multiple vendors require the same Excel format, assign the same PO-EXCEL group code to each vendor's Document Layouts. If a different vendor needs a different format, create a separate Attachment Group with the appropriate layout.

Step 5: Test

  1. Create or open a purchase order for the vendor.
  2. Use the Send by Email action.
  3. Verify the email contains two attachments:
    • The standard purchase order document (in its usual format).
    • The additional Excel file rendered from the custom layout.
  4. Open the Excel file and confirm it matches the vendor's required format.

Result

When a purchase order is emailed to this vendor, the recipient receives:

  1. The standard purchase order document (the primary attachment, e.g. PDF from the default layout).
  2. An Excel file (.xlsx) rendered from the vendor-specific report layout, formatted to match their procurement requirements.

No manual steps are required — the Excel attachment is generated and included automatically whenever a purchase order is sent to this vendor.